package com.achievement.service;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import com.achievement.dao.ScoreRepository;
import com.achievement.entity.Score;
import com.common.util.TablePage;
@Service
@Transactional
public class ScoreService implements IScoreService {
	@Autowired
	private ScoreRepository scoreDao;
	@Override
	public TablePage<Score> findPage(Specification<Score> spec, Pageable pageable) {
		// TODO Auto-generated method stub
		Page<Score> page = scoreDao.findAll(spec, pageable);
		return TablePage.getTablePage(page);
	}

}
